<template>
  <div class="message-type-demo">
    <MButton type="primary" @click="handleOnCloseClick"
      >关闭回调 onClose</MButton
    >
  </div>
</template>
<script lang="ts">
import { messageA } from "/@/m-ui";
import { defineComponent } from "vue";
export default defineComponent({
  components: {},
  setup() {
    const handleOnCloseClick = () => {
      messageA({
        message: "看下控制台,有调用关闭回调",
        onClose: () => {
          console.log("关了..");
        },
      });
    };
    return {
      handleOnCloseClick,
    };
  },
});
</script>

<style>
.message-type-demo .m-button {
  margin: 10px;
}
</style>
